app.service("uploadService",function ($http) {
        this.uploadFile=function () {
            var formData = new formateData();
            formData.append("file",file.files[0]);
            return $http({
                method:'post',
                url:'/upload.do',
                data:'formData',
                headers: {'Content-Type':undefined},
                transformRequest: angular.identity
            })
        }
})